package com.gome.userCenter.dao;

import com.google.common.hash.HashCode;
import com.google.common.hash.HashFunction;
import com.google.common.hash.Hashing;

public class Hash {

    public static long hash(long value) {
        HashFunction hf = Hashing.md5();
        HashCode hc = hf.newHasher().putLong(value).hash();
        long hash = hc.asLong();
        if (hash < 0) hash = -hash;
        return hash;
    }
}
